package com.hkemmm.shop.service.impl;

import com.hkemmm.shop.dao.CommentMapper;
import com.hkemmm.shop.entity.Comment;
import com.hkemmm.shop.service.ICommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService implements ICommentService {
    @Autowired
    private CommentMapper commentMapper;


    @Override
    public List<Comment> getCommentByGoods(Integer goodsId) {
        return commentMapper.getCommentByGoods(goodsId);
    }

    @Override
    public int countCommentNum(Integer id) {
        return commentMapper.countCommentNum(id);
    }

    @Override
    public int insertSelective(Comment record) {
        return commentMapper.insertSelective(record);
    }


}
